package main;

import Arbore.ArboreFunctional;
import Arbore.Nod;
import functii.elementare.Constanta;
import functii.trigonometrice.Cos;
import functii.trigonometrice.Tg;
import functii.elementare.Necunoscuta;
import functii.elementare.Putere;
import functii.trigonometrice.Sin;
import operatori.Cat;
import operatori.Plus;
import operatori.Produs;

public class Main {
    public static void main(String[] args) {
        Nod p = new Plus();
        Nod n1 = new Necunoscuta();
        Nod p1 = new Putere();
        Nod n2 = new Necunoscuta();
        Nod c1 = new Constanta (5);
        Nod p2 = new Produs();

        p.setfStang(n1);
        p.setfDrept(p2);
        p2.setfStang(p1);
        p1.setfStang(n2);
        p2.setfDrept(c1);

        ArboreFunctional a1 = new ArboreFunctional(p);

        System.out.println(a1.toString());
        System.out.println(a1.calculezValoare(1));
        System.out.println(a1.derivata());
        
    }
}
